package com.dongdongshop.serviceimpl;

import com.dongdongshop.mapper.TbAreasMapper;
import com.dongdongshop.pojo.TbAreas;
import com.dongdongshop.pojo.TbAreasExample;
import com.dongdongshop.pojo.TbCities;
import com.dongdongshop.service.TbAreasService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@com.alibaba.dubbo.config.annotation.Service
public class TbAreasServiceImpl implements TbAreasService {
@Autowired
private TbAreasMapper tbAreasMapper;
    //根据id查询下一级地区(县)
    @Override
    public List<TbAreas> selectAreasByCityId(String id) {
        TbAreasExample te = new TbAreasExample();
        TbAreasExample.Criteria criteria = te.createCriteria();
        criteria.andCityidEqualTo(id);
        List<TbAreas> tbAreas = tbAreasMapper.selectByExample(te);
        return tbAreas;
    }
}
